package com.stiove.whwh.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.stiove.whwh.dao.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("select id,username,head_img,phone,is_admin from user where phone = #{phone} limit 1  ")
    public User getUserByPhone(String phone);

    @Select("select id,username,head_img,phone,is_admin from user where id = #{id} limit 1  ")
    public User getUserInfo(long id);
}
